<div id="show_youtube">
	<div id="main" class="container">
			<div class="main_image">
				<object height="385" width="600" type="application/x-shockwave-flash" data="http://www.youtube.com/v/yEoblrdXnkY&amp;hl=en&amp;fs=1&amp;autoplay=0;loop =1;repeat=1" id="player" style="visibility: visible;">
					<param name="allowScriptAccess" value="always"/>
					<param name="allowfullscreen" value="true"/>
				</object>
				<div id="main_image_desc" class="desc">
					<a href="#wrapper" class="collapse">Close Me!</a>
					<div class="block">
						<h2 class="h2_tile_youtube"><a class="a_tile_youtube" href="http://www.youtube.com/v/yEoblrdXnkY&amp;hl=en&amp;fs=1&amp;autoplay=0;loop =1;repeat=1">This isTitle Youtube - 123S</a></h2>
						<span class="attr">- By</span> <span class="view">:&nbsp; Mr Diep - 12 </span>
						<span class="attr">- Duration</span> <span class="view">:&nbsp;423422 </span>
						<span class="attr"> - Views</span> <span class="view">:&nbsp;4342423</span>
						<p>Lorem ipsum dolor sit amet, consec tetuer adipiscing elit. Praesent vestibulum molestie lacus. Aenean nonummy hendrerit mauris. Phasellus porta. Fusce suscipit varius mi. </p>
					</div>
				</div>
			</div>
			<div id="fix_right_tab">
				<div id="sidebarTabs_youtube" class="fix_sidebarTabs_youtube">
					<ul id="sidebarTabs_title">
						<li><a rel="sidebarTabs_commented1" class="selected" href="#">Search Video</a></li>
						<li><a rel="sidebarTabs_newly_added1" href="#" class="">Video By Category</a></li>
						<li><a rel="sidebarTabs_newly_video" href="#" class="">Most View</a></li>
					</ul>

					<div id="sidebarTabs_body1">
						<ol id="sidebarTabs_commented1" style="display: none;">
							<li>
									<div class="search_youtube">
										<form action="#" onsubmit="on_click_me();" method="post" id="form_search_video">
											<fieldset>
												<input title="You can click to search!" type="text" class="required" onblur="if(this.value=='')this.value=this.defaultValue;" onfocus="if(this.value==this.defaultValue)this.value='';" value="Search key word..." name="s_youtube" id="s_youtube">
												<input type="image" value="" alt="Search in site..." src="<?php echo $this->webroot;?>img/button_go1.png" id="searchsubmit_youtube"> 
											</fieldset>
										</form>
									</div>
									<div id="research_youtube">	</div>
							</li>
								
						</ol>
					
						<ol id="sidebarTabs_newly_added1" style="display: block;">
							<li>
								<div class="search_youtube">	
									<select  class="select_search_youtube" id="sl_search">
										<optgroup label="Select Category">
											<option value="most_viewed">Most Viewed</option>
											<option value="top-five">Top five</option>
											<option value="Travel">Travel</option>
											<option value="top_rated">Top Rated</option>
											<!--<option value="most_shared">Most Shared</option>-->
											<option value="most_recent">Most Recent</option>
											<option value="recently_featured">Recently featured</option>
											<option value="on_the_web">Trending videos</option>
										</optgroup>
									</select>
								</div>
								<div  id="research_youtube_cat">	</div>
							</li>
						</ol>
						<ol id="sidebarTabs_newly_video" style="display: block;">
							<li>
								<div class="image_thumb" id="research_youtube_video">
	
								</div>
							</li>
						</ol>
					</div><!-- /sidebarTabs_body -->
									
					<script type="text/javascript">
					var sidebarTabs_youtube=new ddtabcontent("sidebarTabs_youtube")
					sidebarTabs_youtube.setpersist(true)
					sidebarTabs_youtube.setselectedClassTarget("link")
					sidebarTabs_youtube.init()
					</script>
					<script>
						$(document).ready(function() {	

						//Show Banner
						$(".main_image .desc").show(); //Show Banner
						$(".main_image .block").animate({ opacity: 0.85 }, 1 ); //Set Opacity

						//Click and Hover events for thumbnail list
						$(".image_thumb ul li:first").addClass('active'); 
						$(".image_thumb ul li").click(function(){ 
							//Set Variables
							var imgAlt = $(this).find('img').attr("alt"); //Get Alt Tag of Image
							var imgTitle = $(this).find('a').attr("href"); //Get Main Image URL
							var imgDesc = $(this).find('.block').html(); 	//Get HTML of block
							var imgDescHeight = $(".main_image").find('.block').height();	//Calculate height of block	
							
							if ($(this).is(".active")) {  //If it's already active, then...
								return false; // Don't click through
							} else {
								//Animate the Teaser				
								$(".main_image .block").animate({ opacity: 0, marginBottom: -imgDescHeight }, 250 , function() {
									$(".main_image .block").html(imgDesc).animate({ opacity: 0.85,	marginBottom: "0" }, 250 );
									$(".main_image object").attr({ data: imgTitle , alt: imgAlt});
								});
							}
							
							$(".image_thumb ul li").removeClass('active'); //Remove class of 'active' on all lists
							$(this).addClass('active');  //add class of 'active' on this list only
							
							return false;
							
						}) .hover(function(){
							$(this).addClass('hover');
							}, function() {
							$(this).removeClass('hover');
						});
						//Toggle Teaser
						$("a.collapse").click(function(){
							$(".main_image .block").slideToggle();
							$("a.collapse").toggleClass("show");
						});
						//$(".main_image .block").slideToggle();
						//search
				
						 $('#searchsubmit_youtube').click(function(){
									var get_select_search = 'search';
									var get_txt_search = $("#s_youtube").val();
									if((get_txt_search !='') || (get_txt_search !='Search in site...')){
										var url = '<?php echo $this->Html->url('/videos/youtube_ajax_search');?>';
										$('#research_youtube').fadeIn().html('<?php echo $this->Html->image('ajax-loader.gif') ?>');
										$.post(url,{set_txt_search : get_txt_search,set_select_search:get_select_search},function(data){
										$('#research_youtube').html(data);
										});
									}
									return false;
							});
							
							//auto load youtobe
							function auto_load_youtube(){
								var get_txt_search = $("#s_youtube").val();
								var url = '<?php echo $this->Html->url('/videos/youtube_ajax_autoload'); ?>';
								$('#research_youtube').fadeIn().html('<?php echo $this->Html->image('ajax-loader.gif') ?>');
								$.post(url,{set_select_search : get_txt_search},function(data){
								$('#research_youtube').html(data);
								});
								return false;
							}
							//auto_load_youtube();
							
							//onchange 
							  $('#sl_search').change(function(){
									
									if ($(this).val() !='') {
										var url = '<?php echo $this->Html->url('/videos/youtube_ajax_search');?>';
										$('#research_youtube_cat').fadeIn().html('<?php echo $this->Html->image('ajax-loader.gif') ?>');
										$.post(url,{set_select_search : $(this).val()},function(data){
										$('#research_youtube_cat').html(data);
										});
									}
								});
							function on_click_me(){
									var get_select_search = 'search';
									var get_txt_search = $("#s_youtube").val();
									if((get_txt_search !='') || (get_txt_search !='Search in site...')){
										var url = '<?php echo $this->Html->url('/videos/youtube_ajax_search');?>';
										$('#research_youtube').fadeIn().html('<?php echo $this->Html->image('ajax-loader.gif') ?>');
										$.post(url,{set_txt_search : get_txt_search,set_select_search:get_select_search},function(data){
										$('#research_youtube').html(data);
										});
									}
									return false;
							}
					});//Close Function
					</script>
				</div>
			</div>
	</div>
</div>
<?php echo $this->element('home_media');?>